/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.system.mapper;


import com.koron.system.domain.Announcement;
import org.apache.ibatis.annotations.Param;
import org.koron.ebs.mybatis.EnvSource;

import java.util.Date;
import java.util.List;


public interface AnnouncementMapper {

    /**
     * 新增公告
     * @param bean
     * @return
     */
    Integer insert(@Param("bean") Announcement bean);

    /**
     * 修改公告
     * @param bean
     * @return
     */
    Integer update(@Param("bean") Announcement bean);

    /**
     *物理删除通知公告
     * @param idList
     * @return
     */
    Integer batchDetele(@Param("idList") List<String> idList);

    /**
     * 逻辑删除通知公告
     * @param idList
     * @return
     */
    Integer batchDeteleLogic(@Param("idList") List<String> idList);

    /**
     * 根据主键查询通知公告详情
     * @param id
     * @return
     */
    Announcement queryOne(@Param("id") String id);

    /**
     * 根据指定条件查询通知公告
     * @param title
     * @param beginTime
     * @param endTime
     * @param start
     * @param rows
     * @return
     */
    List<Announcement> queryByCondition(@Param("title") String title, @Param("beginTime")Date beginTime,@Param("endTime")Date endTime,
                                        @Param("start")Integer start,@Param("rows")Integer rows);

    /**
     *  根据指定条件统计通知公告
     * @param title
     * @param beginTime
     * @param endTime
     * @return
     */
    Integer countByCondition(@Param("title") String title, @Param("beginTime")Date beginTime,@Param("endTime")Date endTime);
}
